Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dex): use postgresql as backend #839

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

feat(dex): use postgresql as backend #839

wants to merge 18 commits into from

Conversation

kengou
Copy link
Contributor

@kengou kengou commented Jan 9, 2025

Description

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help
  • Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

  • πŸ“œ README.md
  • 🀝 Documentation pages updated
  • πŸ™… no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

pkg/controllers/organization/dex.go Outdated Show resolved Hide resolved
pkg/controllers/organization/dex.go Outdated Show resolved Hide resolved
pkg/controllers/organization/dex.go Outdated Show resolved Hide resolved
pkg/controllers/organization/dex.go Outdated Show resolved Hide resolved
cmd/greenhouse/main.go Outdated Show resolved Hide resolved
Comment on lines 97 to 101
flag.StringVar(&pgDB, "database", os.Getenv("DB_NAME"), "Database name")
flag.StringVar(&pgHost, "dbHost", os.Getenv("DB_HOST"), "Database host")
flag.Uint16Var(&pgPort, "dbPort", 5432, "Database port")
flag.StringVar(&pgUser, "dbUser", os.Getenv("DB_USER"), "Database user")
flag.StringVar(&pgPasswd, "dbPassword", os.Getenv("DB_PASSWORD"), "Database password")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is quite broad. I think in this case we can make it more specific and prefix with Dex e.g. "Dex Database name". Just to avoid confusion on what the DB is for.

Copy link
Contributor

@abhijith-darshan abhijith-darshan Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn’t it better if these credentials came from a secret instead of args? The deployment can then set it as env variables instead.

The connection to DB can be opened during appStart / main and the client can be passed along.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, the password would come from a secret, but since the underlying helm chart is not yet uploaded I can not include it here.

@kengou kengou requested a review from a team as a code owner January 16, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants